<html><head><title>Movie.pb</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;   PureBasic - Movie example file
</font><font color="#006666">;
</font><font color="#006666">;    (c) Fantaisie Software
</font><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font>
<b><font color="#006666">If</font></b> <font color="#006666">InitMovie</font>() = 0
<font color="#006666">  MessageRequester</font>("Error", "Can't initialize movie playback !", 0) 
  <b><font color="#006666">End</font></b>
<b><font color="#006666">EndIf</font></b>

MovieName$ =<font color="#006666"> OpenFileRequester</font>("Choose the movie to play", "", "Movie files|*.avi;*.mpg|All Files|*.*", 0)
<b><font color="#006666">If</font></b> MovieName$
  <b><font color="#006666">If</font></b> <font color="#006666">LoadMovie</font>(0, MovieName$)
  
<font color="#006666">    OpenWindow</font>(0, 100, 150,<font color="#006666"> MovieWidth</font>(0),<font color="#006666"> MovieHeight</font>(0), "PureBasic - Movie")
<font color="#006666">    PlayMovie</font>(0,<font color="#006666"> WindowID</font>(0))
      
    <b><font color="#006666">Repeat</font></b>
    <b><font color="#006666">Until</font></b> <font color="#006666">WaitWindowEvent</font>() = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#006666">Else</font></b>
<font color="#006666">    MessageRequester</font>("Error", "Can't load the movie...", 0)
  <b><font color="#006666">EndIf</font></b>
<b><font color="#006666">EndIf</font></b> </font></pre>
</body></html>
